package com.lt.flashcard.model.entity;

import java.util.Date;

import org.bson.types.ObjectId;

import com.google.code.morphia.annotations.Entity;
import com.google.code.morphia.annotations.Id;
import com.google.code.morphia.annotations.Indexed;

/**
 * Store the code to use for many purpuse
 * @author ocsen
 *
 */
@Entity
public class RefererCode {

	@Id
	private ObjectId id;
	
	@Indexed(unique=true)
	private String code = "";
	
	private String type = "user";
	
	private Date created = new Date();
	
	private Long targetid;

	public ObjectId getId() {
		return id;
	}

	public void setId(ObjectId id) {
		this.id = id;
	}

	public String getCode() {
		return code;
	}

	public void setCode(String code) {
		this.code = code;
	}

	public String getType() {
		return type;
	}

	public void setType(String type) {
		this.type = type;
	}

	public Date getCreated() {
		return created;
	}

	public void setCreated(Date created) {
		this.created = created;
	}

	public Long getTargetid() {
		return targetid;
	}

	public void setTargetid(Long targetid) {
		this.targetid = targetid;
	}
}
